import 'package:fish_redux/fish_redux.dart';
import 'package:hayll_app_village_master/hayll/village_manager/device/device_log_page/bean/device_log.dart';

//TODO replace with your own action
enum DeviceLogAction {
  action,
  getDeviceLog,
  refresh,
  getDeviceLogContent,
}

class DeviceLogActionCreator {
  static Action onAction() {
    return const Action(DeviceLogAction.action);
  }

  static Action getDeviceLog(String deviceNo, int day) {
    return Action(DeviceLogAction.getDeviceLog,
        payload: {'deviceNo': deviceNo, 'day': day});
  }

  static Action refreshUI() {
    return const Action(DeviceLogAction.refresh);
  }

  static Action scanLogContent(DeviceLogResult log) {
    return Action(DeviceLogAction.getDeviceLogContent, payload: log);
  }
}
